package regex.test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexStrPreZero {

	public static void main(String[] args) {
		Pattern pattern = Pattern.compile("0+");
		Matcher matcher = pattern.matcher("666666");
		System.out.println(matcher.matches()); // false
		System.out.println("0666".startsWith("0")); // true
		System.out.println("00666".startsWith("0")); // true
		System.out.println("0006066".startsWith("0")); // true
		System.out.println("0000666".startsWith("0")); // true
		System.out.println("00000666".startsWith("0")); // true

	}

}
